<template>  
    <div>  
      <h2>MyLogin</h2>  
      <form @submit.prevent="mylogin">  
        <div>  
          <label for="username">Username:</label>  
          <input type="text" id="username" v-model="username" required>  
        </div>  
        <div>  
          <label for="password">Password:</label>  
          <input type="password" id="password" v-model="password" required>  
        </div>  
        <button type="submit">MyLogin</button>  
      </form>  
    </div>  
  </template>  
    
  <script>  
  export default {  
    data() {  
      return {  
        username: '',  
        password: ''  
      };  
    },  
    methods: {  
      login() {  
        if (this.username === 'admin' && this.password === '123456') {  
        
          this.$router.push({ name: 'StudentSystem' });  
        } else {  
          alert('Invalid username or password');  
        }  
      }  
    }  
  };  
  </script>